<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function SuperType(name) {
      this.property = true
      this.uname = name

      // console.log(arguments); // 伪数组
      // for (let value of arguments) {
      //   SuperType.prototype[value] = value
      // }
    }

    SuperType.prototype.getSuperValue = function() {
      return this.property
    }

    function SubType() {
      SuperType.call(this)
      this.subProperty = false
    }
    SubType.prototype = new SuperType('cuifan')
    SubType.prototype.getSubValue = function() {
      return this.subProperty
    }

    let instance = new SubType()

    // console.log(instance.getSubValue());
    // console.log(instance.getSuperValue());
    // console.log(instance.cuifan);
  </script>
</body>

</html>